I need to go to my shop.
And on this bell, I'm going to hit the alt and click.
And then I have my shop bell.
And there's the bell.
Top of the point.
The top and the bottom.
They're just parts, right?
There's nothing there's nothing particularly cool about them.
I'm going to put a click detector on here that's going to activate my store.
Let's hit the plus sign click detector, and I'll just call this click.
Here we go.
And I also want to put a script on here.
Hit the plus sign.
I had a script and this script I'm going to call Activate Shop script, activate Shop script, and we'll
get it going.
We'll just just do something simple here.
I'm going to close this so we have more space.
There's a print button in air or a print statement in there.
Let's get a variable pointing to our click.
So we have a script dot parent and then we go down one level to get click.
Right.
There it is.
Click right.
So that's the script.
Bell tops.
Parent There's a click.
Now the clicks are pretty good because you can get the player from the click.
Whoever clicked the foul, which is or the button with a click detector, mouse click colon connect
function player.
Now let's just print it out.
Just make sure that we can print stuff that we when we click the bell, things are working so far.
Hey and then I'll do player dot name, right?
Because we're going to get the player from the mouse click.
When we click the click detector, let's go ahead and go view output.
Hit the play button.
Playing same day, Game six.
All right.
I'm going to go over here.
Boom.
There it is.
I see him.
Hey, Semtech Nitro.
One, right?
We have too much stuff.
I think what I'm going to do is I'm going to get rid of some of these print statements.
All right, let's turn this game off and we'll get some of these print statements.
We got play playing the same day.
Let's go to the game manager, game managers and server script service right here.
Game manager and scroll down.
Here it is playing in the same day that is in I'm going to close this that is in check daily streak.
So this fires a lot.
I'm only going to comment it out because we may need to see streak info if we run into any problems.
I don't suspect we will.
And another one under the save loop.
Right.
So we're saving player data.
If the data is not bad, let's not print that out.
There we go.
If it is bad, we will print that out.
We might need that.
We might need that info.
And then under the save loop, I'm going to get rid of that save.
I'm sorry.
I'm going to get rid of that print one right here.
All right.
And message queue.
So if you go down to your starter guy, we had that message thing we did not too not too long ago.
Print message, script.
We don't need to know if the queue is empty.
I will comment that out.
Now let's go ahead and play this, see if we have a a little bit better of a time seeing our print statement.
I'm going to go to the output window view output and that's a little bit better.
I'm going to go over to my bell.
Dang, we don't have the dang yet.
We're going to add that.
Hey Semtech Nitro one.
So our click detector knew that we clicked the bell.
That's great.
We have a player.
It's good and turn off our game.
And now I want to go to I want to close some of this stuff that I was playing around with.
I want to go to my activate shop script.
Remember?
That is in your shop.
There's our shop.
We'll open it up and activate shop script.
If you can't find a script and it's open, like let's say you're here, if you right click on Activate
shop, you can show in Explorer.
And that's pretty handy.
There it is.
That's pretty handy if you lose a script, especially if you're kind of careless.
You're developing things real quick and you have like 50 things named script, which is not good, but
then you can find out which script you have, right?
You just do that right click and then show and explore.
All right.
So I want to send a message to my client because we're going to bring up a window when we hit our little
when we hit our little bell, we're also going to do a dang, right.
So I need to get replicated storage gain, get service, replicated storage.
I also want a remote event.
I'm going to do a remote event for my shop.
I'm going to get rid of this.
So let's go down replicated storage.
And I'm going to do the remote event to open and close the windows and to do purchases, but I'm going
to call it shop Ray.
So in replicated storage, hit the plus, add a remote event and let's call this shop Ari.
There we go.
And then I can get that here in my activate shop script.
I'll say shop.
Ari, It is in replicated storage.
Wait for child shop, Ari.
Now, here, we could get rid of this so we don't have 1000 print statements again.
And let's do a shop.
Are a colon fire client, All right.
And.
I'm just going to pass in the client that I want to fire to.
And that's the player who clicked the bell.